package com.and.bean;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import org.compass.annotations.Searchable;

@Entity
@Searchable(root = false)
public class ParticipleCategory implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4894038732793602980L;
	
	private Integer id;
	private String category;
	private Set<Participle> participle;
	private Set<Suggestion> suggestion;
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(length = 50, nullable = false)
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	
	@OneToMany(mappedBy = "participleCategory",cascade={CascadeType.PERSIST, CascadeType.MERGE})
	public Set<Participle> getParticiple() {
		return participle;
	}
	public void setParticiple(Set<Participle> participle) {
		this.participle = participle;
	}
	
	@OneToMany(mappedBy = "participleCategory",cascade={CascadeType.PERSIST, CascadeType.MERGE})
	public Set<Suggestion> getSuggestion() {
		return suggestion;
	}
	public void setSuggestion(Set<Suggestion> suggestion) {
		this.suggestion = suggestion;
	}
	
	
}
